package com.sa07.ui.bean;

import com.sa07.utils.StringUtils;

/**
 * 状态栏项
 * 
 * @author Long.shangbo
 * 
 *         2014-2-15 上午1:24:08
 */
public class StatuslItem {

	/**
	 * 名称
	 */
	private String name = null;

	/**
	 * 状态栏文本
	 */
	private String label = null;

	/**
	 * 处理类
	 */
	private String handlerClass = null;

	/**
	 * 是否可用
	 */
	private boolean disabled = false;

	public String getLabel() {
		return label;
	}

	public void setLabel(String label) {
		this.label = label;
	}

	public String getHandlerClass() {
		return handlerClass;
	}

	public void setHandlerClass(String handlerClass) {
		this.handlerClass = handlerClass;
	}

	public boolean isDisabled() {
		return disabled;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public void setDisabled(String disabled) {
		if (!StringUtils.isNullOrEmpty(disabled)) {
			if (disabled.equalsIgnoreCase("true")) {
				this.disabled = true;
			} else if (disabled.equals("1")) {
				this.disabled = true;
			} else {
				this.disabled = false;
			}
		}
	}

	public StatuslItem(String name, String label, String handlerClass,
			boolean disabled) {
		super();
		this.name = name;
		this.label = label;
		this.handlerClass = handlerClass;
		this.disabled = disabled;
	}

	public StatuslItem() {
		super();
	}
}
